from django.db import models
from django.views.decorators.csrf import csrf_exempt
# Create your models here.

class userRegister(models.Model):
    userName=models.CharField(max_length=20)
    userSex = models.CharField(max_length=5)
    userAge = models.IntegerField(max_length=5)
    userAcademy = models.CharField(max_length=50)
    userMajor = models.CharField(max_length=50)
    userAddress = models.CharField(max_length=100)
    userEmail = models.CharField(max_length=100)

    def __unicode__(self):
        return u'%s %s' % (self.userName,self.userSex)


class userFeedMessage(models.Model):
    userName=models.CharField(max_length=50)
    userEmail=models.CharField(max_length=100)
    userMessage=models.CharField(max_length=250)

    def __unicode__(self):
        return u'%s %s' % (self.userName,self.userEmail)#show two item


    #def __unicode__(self):    (show one item)
        #return self.userName  (show one item)
